package com.zbs.framework.chat.entity;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class RemoteMessage implements Serializable {

    private static final long serialVersionUID = -8536780780956487741L;

    /**
     * 谁发的
     */
    private String identifier;
    /**
     * 发送给谁
     */
    private String to;
    /**
     * 发送内容
     */
    private String text;


    public RemoteMessage(String identifier, MessageBody msg) {
        this.identifier = identifier;
        this.to = msg.getTo();
        this.text = msg.getText();
    }
}
